
import {encryption } from '@/api/random.js';

const TokenKey = 'Admin-Token';

export function getToken() {
  // return Cookies.get(TokenKey)
  return window.localStorage.getItem(TokenKey);
}

export function getAuToken() {
  var authToken = window.localStorage.getItem("username")+"_"+encryption(new Date().getTime()+"");
  return  authToken;
}

export function setToken(token) {
  // return Cookies.set(TokenKey, token)
  return window.localStorage.setItem(TokenKey,token);
}

export function removeToken() {
  // return Cookies.remove(TokenKey)
  return window.localStorage.removeItem(TokenKey);
}
